<template>
  <div>Home Page:{{ count }}--{{ doubleCount }}</div>
  <div class="mt-2">
    <button @click="increment">点我数字加1</button>
    <button @click="decrement">点我数字减1</button>
    <button @click="goLogin">去登陆</button>
  </div>
</template>

<script setup lang="ts">
import { useRouter } from 'vue-router'
import { useCounterStore } from '@/stores/modules/counter.ts'
import { storeToRefs } from 'pinia'

const router = useRouter()
const { count, doubleCount } = storeToRefs(useCounterStore())
const { increment, decrement } = useCounterStore()

const goLogin = () => {
  router.push('/login')
}
</script>

<style scoped></style>
